;;====================================================================
;;                         body.lisp
;; This program provides :roll/geo/body package.
;; This package gives Geometric modeller.
;; ROLL geometric models are consist of vertex(array), edge and face.
;; 
;;                               written by R.Ueda(garaemon@gmail.net)
;;====================================================================

(defclass* <vertex>
    ()
  ((value))
  (:documentation
   "<vertex> class has a float vector, whose length is 3 in value slot."
   ))

(defclass* <edge>
    ()
  ((to nil)
   (from nil)
   (length nil))
  (:documentation
   "<edge> class consists of to and from vertex."))

(defclass* <face>
    ()
  ((coordinates nil)
   (edges nil)
   (normal nil))
  (:documentation
   "<face> class consists of edges.
    The positions of edges are represented in
    <face>'s local coordinates.
    The edges list must be 'closed', 'closed' means
    (car edges)'s from-vertex is the same to
    (car (last edges))'s to-vertex, and the order of the edges
    is CCW."))

(defclass* <body>
    ()
  ((coordinates nil)
   (faces nil)
   (information nil))
  (:documentation
   ""))

(defun make-vertex (vec)
  (declare (type (simple-array single-float (3)) vec))
  (make-instance '<vertiex> :value vec))

(defun make-edge (from to)
  
  )